package com.tl.commonlibrary.ui.picture;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.tl.commonlibrary.R;
import com.tl.commonlibrary.ui.BaseFragmentActivity;

/**
 * Created by Administrator on 2017/6/13 0013.
 */

public abstract class TakePhotoActivity extends BaseFragmentActivity  {
//    private static final String TAG = TakePhotoActivity.class.getName();
//    private TakePhoto takePhoto;
//    private InvokeParam invokeParam;
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        getTakePhoto().onCreate(savedInstanceState);
//        super.onCreate(savedInstanceState);
//    }
//    @Override
//    protected void onSaveInstanceState(Bundle outState) {
//        getTakePhoto().onSaveInstanceState(outState);
//        super.onSaveInstanceState(outState);
//    }
//    @Override
//    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
//        getTakePhoto().onActivityResult(requestCode, resultCode, data);
//        super.onActivityResult(requestCode, resultCode, data);
//    }
//
//    @Override
//    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
//        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
//        PermissionManager.TPermissionType type=PermissionManager.onRequestPermissionsResult(requestCode,permissions,grantResults);
//        PermissionManager.handlePermissionsResult(this,type,invokeParam,this);
//    }
//
//    /**
//     *  获取TakePhoto实例
//     * @return
//     */
//    public TakePhoto getTakePhoto(){
//        if (takePhoto==null){
//            takePhoto= (TakePhoto) TakePhotoInvocationHandler.of(this).bind(new TakePhotoImpl(this,this));
//        }
//        return takePhoto;
//    }
//
//    @Override
//    public PermissionManager.TPermissionType invoke(InvokeParam invokeParam) {
//        PermissionManager.TPermissionType type=PermissionManager.checkPermission(TContextWrap.of(this),invokeParam.getMethod());
//        if(PermissionManager.TPermissionType.WAIT.equals(type)){
//            this.invokeParam=invokeParam;
//        }
//        return type;
//    }

}
